// DocumentPayoutGraphBitmapFile.cpp: implementation of the CDocumentPayoutGraphBitmapFile class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "AUSlotsTester.h"
#include "DocumentPayoutGraphBitmapFile.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

CDocumentPayoutGraphBitmapFile::CDocumentPayoutGraphBitmapFile( const CAUSlotsTesterDoc* pDoc )
{
	m_pDoc = pDoc;
	m_bDirty = true;
}

CDocumentPayoutGraphBitmapFile::~CDocumentPayoutGraphBitmapFile()
{
}

bool CDocumentPayoutGraphBitmapFile::IsDirty() const
{
	return m_bDirty;
}

void CDocumentPayoutGraphBitmapFile::SetDirty( bool bDirty )
{
	m_bDirty = bDirty;
}

bool CDocumentPayoutGraphBitmapFile::GetFileContents( LPCSTR* ppszContentType, void** ppFileContents, UINT* pnFileSize ) const
{
	CDocumentPayoutGraphBitmapFile* pThis = const_cast< CDocumentPayoutGraphBitmapFile* >( this );

	if ( IsDirty() )
	{
//		pThis->GenerateContent();
		pThis->SetDirty( false );
	}

	return CBitmapWebFile::GetFileContents( ppszContentType, ppFileContents, pnFileSize );
}
